<!DOCTYPE html>
<html lang="zh-cmn-Hans">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
    <title>处理中</title>
    <link rel="stylesheet" href="/static/css/weui.css" />
    <link rel="stylesheet" href="/static/css/example.css" />
</head>

<body ontouchstart>
    <div class="container" id="container"></div>
    <script type="text/html" id="tpl_home">
            <script src="/static/js/jquery.min.js"></script>
            <script src="/static/js/weui.min.js"></script>
            <script type="text/javascript" src="/static/js/jweixin-1.4.0.js"></script>         
            <script src="/static/js/zepto.min.js"></script>
            <script src="/static/js/example.js"></script>
            <!-- <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>-->  
            
            
            <script type="text/javascript">
                $(function() {

                    function getQueryString(name) {
                        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
                        var r = decodeURI(window.location.search).substr(1).match(reg);
                        if (r != null) return (r[2]);
                        return null;
                    };

                    var commuNum = getQueryString('community');
                    var deviceId = getQueryString('device');
                    
                    setTimeout(function(){
                        var fredirect_uri = 'http://gzh.zjnnhj.com/niuneng/register.html?community=' + commuNum + '&device=' + deviceId;
                        var ffurl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx5f2850581e4e064d&redirect_uri=" + encodeURIComponent(fredirect_uri) + "&response_type=code&scope=snsapi_base&state=123#wechat_redirect";
                        location.href = ffurl;
                        }, 500);
                })

            </script>

    </script>
</body>

</html>